<!--
 * @Author: 王明明834578987 10266004+wang-mingming-834578987@user.noreply.gitee.com
 * @Date: 2024-08-29 10:59:23
 * @LastEditors: 王明明834578987 10266004+wang-mingming-834578987@user.noreply.gitee.com
 * @LastEditTime: 2024-09-19 15:42:15
 * @FilePath: \ft-apply-admin\src\views\applicationDetails\RTComponent\InterviewTache\Train\TrainComponent\TrainWatting.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div class="btns">
    <Button v-auth="'sendTrainingMailAccept'" color="primary" @click="sendMail">发送培训邮件</Button>
    <!-- <Button v-auth="'arriveTrainingWaive'" color="warning" @click="surrender">放弃</Button> -->
    <Button v-auth="'editTrainingTime'" color="#5882d1" @click="changeDate">改期</Button>
  </div>
  <SendTrainMailModal ref="modal" @closeModal="closeModal" ></SendTrainMailModal>
</template>

<script setup lang='ts'>
import { ref } from "vue";
import { Button } from "@/components/Button";
import SendTrainMailModal from "../../../../Modals/SendTrainMailModal.vue";
const modal = ref<any>(SendTrainMailModal)
const sendMail = async () => {
  console.log('sendMail')
  modal.value.show = true;
}
const closeModal = () => {
  console.log('===>closeModal')
  modal.value.show = false
}
const emits = defineEmits(['surrender', 'changeDate'])
const surrender = () => {
  console.log('surrender')
  emits('surrender', '预约邮件已发送')
}
const changeDate = () => {
  console.log('changeDate 改期');
  emits('changeDate', '预约邮件已发送')
}
</script>
<style lang="less" scoped>
.btns {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
</style>